﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ProviderQuestions.aspx.cs" Inherits="ProviderQuestions" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajxasp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <style type="text/css">
        .style2
        {
            width: 171px;
            height: 65px;
            padding-left:20px;
        }
        .style3
        {
            height: 65px;
            padding-left:20px;
        }
        .style4
        {
            width: 171px;
            height: 64px;
            padding-left:20px;
        }
        .style5
        {
            height: 65px;
            padding-left:20px;
        }
        .style6
        {
            color: #0033CC;
            font-size: x-large;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <span class="style6"><strong>Recommend Provider</strong></span>
    <br /><br />
    Put your score to each factor to show how much you care.

    <div>
        <br />
    <img alt="" src="images/scale.jpg" style="width: 667px" />
        
        <asp:GridView ID="grdQuestion" runat="server" AutoGenerateColumns="False" 
            DataSourceID="XmlCriteria" CellPadding="4" ForeColor="#333333" 
            GridLines="None" Width="90%" ShowHeader="False" 
             onrowdatabound="grdQuestion_RowDataBound">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="id" HeaderText="ID" SortExpression="id" />
                <asp:BoundField DataField="name" HeaderText="Criteria" SortExpression="name" />


                <asp:TemplateField HeaderText="Value">
                    <ItemTemplate>
                        <asp:TextBox ID="txtScore" runat="server" Text=""></asp:TextBox>
                        <ajxasp:SliderExtender ID="SliderExtender1" runat="server"
                            TargetControlID="txtScore"
                            Minimum="0"
                            Maximum="100"
                            Steps="100" Length="400" />
                        
                    
                    <asp:Label ID="lblAis" runat="server" Text='<%# Bind("ais") %>' Visible=false></asp:Label>
                    <asp:Label ID="lblDtac" runat="server" Text='<%# Bind("dtac") %>' Visible=false></asp:Label>
                    <asp:Label ID="lblTmove" runat="server" Text='<%# Bind("tmove") %>' Visible=false></asp:Label>

                    </ItemTemplate>
                </asp:TemplateField>

            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <asp:XmlDataSource ID="XmlCriteria" runat="server" 
            DataFile="~/App_Data/criteria.xml"></asp:XmlDataSource>
        
        <div style="text-align: center">
            <br />
        <asp:Button ID="btnResult" runat="server" onclick="btnResult_Click" 
            Text="Recommend Provider" Width="173px" />
        </div>
        
        <br />
        Let you see your maching provider: 
        
        <br />
        <br />
        
        
    </div>

     <div>
     <asp:UpdatePanel ID="updResult" runat="server">
          <ContentTemplate>
             <table cellpadding="0" cellspacing="0" >
                 <tr>
                     <td class="style2">
                         <img alt="" src="images/ais.png" style="height: 48px; width: 138px" /></td>
                     <td>
                         <asp:Label ID="lblAis" runat="server" Text="0.0"></asp:Label>
                     </td>
                     <td class="style3">
                     
                                 <asp:Image ID="imgRateAis" runat="server" Height="22px" 
                                     ImageUrl="~/images/rate.jpg" />
                         
                     </td>
                     <td class="style3">
                         &nbsp;</td>
                 </tr>
                 <tr>
                     <td class="style4">
                         <img alt="" src="images/dtac.png" style="height: 58px; width: 106px" /></td>
                     <td>
                         <asp:Label ID="lblDtac" runat="server" Text="0.0"></asp:Label>
                     </td>
                     <td class="style5">
                        <asp:Image ID="imgRateDtac" runat="server" Height="22px" 
                            ImageUrl="~/images/rate.jpg" />
                     </td>
                     <td class="style5">
                     </td>
                 </tr>
                 <tr>
                     <td class="style2">
                         <img alt="" src="images/tmove.png" style="height: 20px; width: 135px" /></td>
                     <td>
                         <asp:Label ID="lblTmove" runat="server" Text="0.0"></asp:Label>
                     </td>
                     <td class="style3">
                        <asp:Image ID="imgRateTmove" runat="server" Height="22px" 
                            ImageUrl="~/images/rate.jpg" />
                     </td>
                     <td class="style3">
                     </td>
                 </tr>
             </table>
             </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnResult" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
     </div>
</asp:Content>

